$(function(){
	
	var page=1;
	var tddata=[
		{
			key:'order_no',
			type:1,
			url:''
		},{
			key:'name',
			type:1,
			url:'{:url("detail")}',
			id:137
		},{
			key:'phone',
			type:1,
			url:''
		},{
			key:'car_number',
			type:1,
			url:''
		},{
			key:'evaluate_time',
			type:1,
			url:''
		},{
			key:'state2',
			type:1,
			url:''
		}];
	var addoperation="";
	var data={};
	{if $Think.get.name}
	data.name="{$Think.get.name}";
	{/if}
	{if $Think.get.order_no}
	data.order_no="{$Think.get.order_no}";
	{/if}
	{if $Think.get.start}
	data.start="{$Think.get.start}";
	{/if}
	{if $Think.get.end}
	data.end="{$Think.get.end}";
	{/if}
	console.log(data)
	ajaxel(1)
	function ajaxel(page){
		Load()
		console.log(data)
		data.page=page
		$.ajax({
			type:'post',
			data:data,
			url:'{:url("adminapi/Order/evaluate")}',
			success:function(res){
				console.log(res)
				Load(1)
				
				for(var stateidx=0;stateidx<res.data.length;stateidx++){
					res.data[stateidx].state2='未评价'
				}
				$('tbody').html(tbodymainf2(res.data.list, 1, tddata, addoperation, 'order_id'))
				$('.pagination').html(pagechang1(res.data.count, 10, page))
				$('.laquo').on('click',function(){
					page-=1;
					console.log(page)
					ajaxel(page)
				})
				$('.pageli').on('click',function(){
					page=$(this).html()
					console.log(page)
					ajaxel(page)
				})
				//下一页
				$('.raquo').on('click',function(){
					page+=1;
					ajaxel(page)
				});
					
			}
		})
		}
})
